<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>文件自动生成系统</title>
<!--    <link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">-->
    <style>
        body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.container {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 400px;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.btn {
    display: inline-block;
    background-color: #007BFF;
    color: white;
    padding: 10px 20px;
    text-align: center;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
}

.btn:hover {
    background-color: #0056b3;
}

.response {
    margin-top: 20px;
}

.response textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: none;
}

    </style>

</head>
<body>
    <div class="container">
        <h1>文件自动生成系统</h1>
        <form method="POST" action="/">
            <div class="form-group">
                <label for="theme">主题：</label>
                <input type="text" id="theme" name="theme" required>
            </div>
            <div class="form-group">
                <label for="main_points">主旨要点：</label>
                <textarea id="main_points" name="main_points" rows="5" required></textarea>
            </div>
            <button type="submit" class="btn">确认生成内容</button>
        </form>

        {% if response_content %}
        <div class="response">
            <h2>生成的内容</h2>
            <textarea readonly rows="10">{{ response_content }}</textarea>
            <form method="POST" action="/generate_document">
                <input type="hidden" name="theme" value="{{ theme }}">
                <input type="hidden" name="main_points" value="{{ main_points }}">
                <input type="hidden" name="response_content" value="{{ response_content }}">
                <button type="submit" class="btn">生成文档</button>
            </form>
        </div>
        {% endif %}
    </div>
</body>
</html>
